package com.boatAnchorAssistant.service.controller.web;

import com.boatAnchorAssistant.pojo.param.resource.*;
import com.boatAnchorAssistant.pojo.vo.resource.*;
import com.boatAnchorAssistant.service.service.in.*;
import nirvana.core.domains.vo.PageResult;
import nirvana.core.domains.vo.ApiResult;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

import java.util.List;

/**
 *   web/资源
 * 【描 述】：
 * 【环 境】：J2SE
 * 【详 细】：
 *
 */
@RestController
@RequestMapping("/resource/web")
public class ResourceWebController {

    private final ResourceService service;

    public ResourceWebController(ResourceService service) {
        this.service = service;
    }


    /**
     * 批量上传资源
     *
     * @param paramList
     * @return
     */
    @PostMapping("/bathUploadResource")
    public ApiResult bathUploadResource(@RequestBody @Valid List<BathUploadResourceParam> paramList) {
        service.bathUploadResource(paramList,0L);
        return ApiResult.ok();
    }


}

